﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Program.cs" company="MyCoreLib">
//   Copyright (C) 2014 Alexey Evlampiev. All rights reserved.
// </copyright>
// <summary>
//   Defines the Program type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MyCoreLib.Examples
{
    using System;
    using System.Configuration;
    using System.Data.SqlClient;
    using System.Diagnostics;
    using System.IO;
    using Data.SqlClient;

    class Program
    {
        static Program()
        {
            var dataDirectory = ConfigurationManager.AppSettings["DataDirectory"];
            Debug.Assert(!string.IsNullOrWhiteSpace(dataDirectory), "DataDirectory appSettings value is missing");
            var dataDirectoryInfo = new DirectoryInfo(dataDirectory);
            Debug.Assert(dataDirectoryInfo.Exists, "{0} DataDirectory does not exist.", dataDirectory);
            AppDomain.CurrentDomain.SetData("DataDirectory", dataDirectoryInfo.FullName);
        }

        static void Main(string[] args)
        {



            //var client = new SqlClientObject("name = AdventureWorks");
            //using (var transaction = client.BeginTransaction())
            //{
            //    client.ExecuteNonQuery(new SqlCommand("print 'hello world'"));
            //    transaction.Commit();
            //}
        }
    }
}
